import type { ILoginAccount } from '@/types'
import jsRequest from '..'

// 登录接口
export function accountLogin(account: ILoginAccount) {
  return jsRequest.post({
    url: '/login',
    data: account
  })
}

// 查看用户信息接口
export function getUserInfoById(id: number) {
  return jsRequest.get({
    url: `/users/${id}`
  })
}

// 获取用户的权限菜单
export function getUserMenusByRoleId(id: number) {
  return jsRequest.get({
    url: `/role/${id}/menu`
  })
}
